package com.ltt.service.impl;

import com.ltt.dao.pojo.Back;
import com.ltt.dao.vo.params.FeedBackParams;
import com.ltt.mapper.FeedBackMapper;
import com.ltt.service.FeedBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ‘李天泰’
 * @version 1.0
 * @description: TODO
 * @date 2023/5/10 14:56
 */
@Service
public class FeedBackServiceImpl implements FeedBackService {
    @Autowired
    private FeedBackMapper feedBackMapper;

    @Override
    public void insertFeedBack(FeedBackParams feedBackParams) {
        feedBackMapper.insertFeedBack(feedBackParams);
    }

    @Override
    public List<Back> getList(int isRead){
        List<Back> backs = feedBackMapper.getAll(isRead);
        return backs;
    }

    @Override
    public void delBack(int id){
        feedBackMapper.del(id);
    }

    @Override
    public List<Back> find(String openId, int isRead){
        List<Back> backs = feedBackMapper.gets(openId, isRead);
        return backs;
    }
}
